<?php


namespace app\api\validate\hotel;


use app\api\validate\BaseValidate;

class CheckHotelRoomOrder extends BaseValidate
{
    protected $rule = [
        'hotel_room_id' => 'require|isPositiveInteger',
        'start_date' => 'require|date',
        'end_date' => 'date',
        'name' => 'require|max:50',
        'phone' => 'require|mobile',
        'id_no' => 'require|idCard',
        'estimate_time' => 'require|max:20',
        'type' => 'require|in:1,2'
    ];

    protected $message = [
        'hotel_room_id' => '请选择正确的房间',
        'start_date' => '请选择正确的入住时间',
        'end_date' => '请选择正确的离开时间',
        'name' => '请输入入住人姓名且长度不大于50',
        'phone' => '请输入入住人正确的手机号',
        'id_no' => '请输入入住人正确的身份证号',
        'estimate_time' => '请选择预计到店时间',
        'type' => '请选择是正常入住还是钟点房'
    ];
}